<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'product-form',
	'enableAjaxValidation'=>false,
        'htmlOptions' => array('enctype' => 'multipart/form-data')
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

        <div class="row buttons" align="right">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'prod_name'); ?>
		<?php echo $form->textField($model,'prod_name',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'prod_name'); ?>
	</div>

	<div class="row">
		<?php echo CHtml::label('Thumbnail', 'Product[thumb]') ?>
		<?php echo CHtml::fileField('Product[thumb]', '', array()) ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'box_img'); ?>
		<?php echo $form->fileField($model,'box_img',array()); ?>
		<?php echo $form->error($model,'box_img'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'prod_img'); ?>
		<?php echo $form->fileField($model,'prod_img',array()); ?>
		<?php echo $form->error($model,'prod_img'); ?>
	</div>

    <div class="row">
		<?php echo $form->labelEx($model,'short_desc'); ?>
		<?php echo $form->textField($model,'short_desc',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'short_desc'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'tag'); ?>
                <?php
                    $this->widget('application.extensions.tinymce.ETinyMce', array(
                            'id' => 'tag',
                            'name' => 'Product[tag]',
                            'options' => array(
                                'theme' => 'advanced',
                                'theme_advanced_toolbar_location' => 'top',
                                'theme_advanced_buttons1' => 'newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect',                                                                
                                'theme_advanced_toolbar_align' => 'left',
                            ),
                            'value' => $model->tag
                        ));
                ?>
		<?php echo $form->error($model,'tag'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'description'); ?>
		<?php
                    $this->widget('application.extensions.tinymce.ETinyMce', array(
                            'id' => 'description',
                            'name' => 'Product[description]',
                            'options' => array(
                                'theme' => 'advanced',
                                'theme_advanced_toolbar_location' => 'top',
                                'theme_advanced_buttons1' => 'newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect',
                                'theme_advanced_buttons2' => 'cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor',
                                'theme_advanced_buttons3' => '',
                                'theme_advanced_toolbar_align' => 'left',
                            ),
                            'value' => $model->description
                        ));
                ?>
		<?php echo $form->error($model,'description'); ?>
	</div>




        <?php if (!$model->isNewRecord): ?>
            <input type="hidden" name="update_id" value="<?php echo $model->prod_id; ?>"/>
        <?php endif; ?>

	<div class="row buttons" align="right">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->